package com.winphone.uvam.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.winphone.uvam.entity.Role;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
  *  Mapper 接口
 * </p>
 *
 * @author lwl
 * @since 2017-12-13
 */
@Service
public interface RoleMapper extends BaseMapper<Role> {


    /**
     *  查询所有
     * @param page
     * @param map
     * @return
     */
    List<Role> selectPageParam(Pagination page, Map map);

    /**
     * 无分页查询
     * @param map
     * @return
     */
    List<Role> selectParam(Map map);

    /**
     * 根据角色id查询角色信息
     * @param id
     * @return
     */
    Role getRoleById(@Param("id") Long id);

}